/**
 *
 *
 * @param {*} number  第几位
 * @param {*} src 名片头像
 * @param {*} name 名片名字
 * @param {*} qrCodeUrl 小程序codeURL图片
 */
const wxml = (name, pic, shareimg,sharebg) =>
	`<view class="container">
	<view class="head">
		<image src="` + pic + `"  class="pic"/>
		<text class="name">` + name + `</text>
	</view>	
	<view class="bottom">
		<image src="` + sharebg + `"  class="qr"/>
	</view>
	<view class="ovf">
		<image src="` + shareimg + `"  class="pic"/>
		<view class="wrap">
			<text class="desc">`+'扫描二维码进入小程序'+`</text>
			<text class="int">`+'来寻梦家居寻找你的客户吧'+`</text>
		</view>
		
	</view>	
</view>
`


/**
 *
 *
 * @param {*} screenWidth 屏幕宽度
 * @param {*} canvasWidth  画布宽度
 * @param {*} canvasHeight  画布高度
 * @param {*} numberWidth  数字宽度，动态设置
 * @return {*} 
 */
const style = (screenWidth, canvasWidth, canvasHeight) => {
	return {
		container: {
			width: canvasWidth,
			height: canvasHeight,
			position: 'relative',
			overflow: 'hidden',
			backgroundColor: '#ffffff',
			borderRadius: 14,
		},
		name: {
			fontSize: 16,
			color: '#333',
			marginLeft: 10,
			marginTop:25,
			width: 150,
			height: 50,
			flexDirection: 'row',
			justifyContent: 'center',
			alignItems: 'center',
		},
		pic: {
			width: 50,
			height: 50,
			marginTop: 10,
			marginLeft: 10,
			marginBottom:10,
			borderRadius: 10,
			overflow: 'hidden',
		},
		"head":{
			width: canvasWidth,
			flexDirection: 'row',
			alignItems: 'center',
			backgroundColor: '#ffffff',
			borderRadius: 14,
		},
		bottom: {
			width: canvasWidth,
			height:canvasWidth,
			flexDirection: 'row',
			justifyContent: 'self-start',
			alignItems: 'center',
			position: 'absolute',
			top: 70,
			left: 10,
			right:10,
			overflow: 'hidden',
			borderRadius: 14,
		},
		qr: {
			width: canvasWidth*0.94,
			height: (canvasWidth * 1.1)-40,
			borderRadius: 5,
		},
		ovf: {
			width: canvasWidth* 0.8,
			height: 80,
			flexDirection: 'row',
			// justifyContent: 'center',
			alignItems: 'center',
			backgroundColor: 'rgba(255,255,255,0.4)',
			position: 'absolute',
			bottom:20,
			left: 25,
			borderRadius: 10,
		},
		desc:{
			fontSize: 15,
			color: '#1C1C1C',
			fontWeight: 500,
			marginLeft: 10,
			marginTop:-10,
			width: 150,
			height: 14,

		},
		int:{
			fontSize: 14,
			color: '#666666',
			marginLeft: 10,
			marginTop:10,
			width: 150,
			height: 10,
			flexDirection: 'row',
			justifyContent: 'center',
			alignItems: 'center',

		}
	}
}

module.exports = {
	wxml,
	style
}
